package cmath.Convert;

import combat.protocol.data.DoublePoint;
import combat.protocol.data.PhysicalObject;

public class Convert {
	
	public Convert()
	{
	}
	
	public static DoublePoint ToDoublePoint(Object _o)
	{
		DoublePoint _loc = new DoublePoint();

		if(_o.getClass().getSuperclass().equals(PhysicalObject.class)) {
		        PhysicalObject physobj = (PhysicalObject) _o;
		        _loc = physobj.getPosition();
		} else {
				_loc = (DoublePoint) _o;
		}
		
		return _loc;
	}
	
	public static Object ToObject(Object _o)
	{
		Object _obj = _o;
		return _obj;
	}
	
}
